livepatch: Always check hypervisor build ID upon livepatch upload
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Tue, 26 Nov 2019 10:07:50 +0000 (10:07 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 13 Dec 2019 14:45:32 +0000 (14:45 +0000)
commit879615f5db1d0a86afd99a67d284a8df6fd85be4
tree4da251ab492ab68820028e84607ebec4010ca63d
parent5852ca48526316918cd82fba1033a6a5379fbc4c
livepatch: Always check hypervisor build ID upon livepatch upload

This change is part of a independant stacked livepatch modules
feature. This feature allows to bypass dependencies between modules
upon loading, but still verifies Xen build ID matching.

In order to prevent (up)loading any livepatches built for different
hypervisor version as indicated by the Xen Build ID, add checking for
the payload's vs Xen's build id match.

To achieve that embed into every livepatch another section with a
dedicated hypervisor build id in it. After the payload is loaded and
the .livepatch.xen_depends section becomes available, perform the
check and reject the payload if there is no match.

Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Andra-Irina Paraschiv <andraprs@amazon.com>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Eslam Elnikety <elnikety@amazon.de>
Reviewed-by: Martin Pohlack <mpohlack@amazon.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
.gitignore
docs/misc/livepatch.pandoc
xen/common/livepatch.c
xen/include/xen/livepatch.h
xen/test/livepatch/Makefile